Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller position stream #505

Merged
merged 3 commits into from
Jul 9, 2020

Conversation

porfirioribeiro
Copy link
Contributor

Sometimes we need to do something when the map position changes.
It can be done at map level using onPositionChanged or on plugins with the rebuild stream.
But i think it should be possible to be notified of map changes with the controller.

I thought about reusing the existing _onMoveSink and changing its type from Null to MapPosition and that might be a breaking change?

The example will not run because it depends on androidX that i added on PR #504

@johnpryan
Copy link
Collaborator

I don't think this an API that flutter_map needs to provide. Can't users choose to use package:location if the want to?

@johnpryan
Copy link
Collaborator

There's now a sample that shows how to do this with package:location: #447

@johnpryan johnpryan closed this Jul 8, 2020
@porfirioribeiro
Copy link
Contributor Author

Its not exactly the same problem.
That sample is to move the map to the current GPS location

My PR was just to be able to subscribe the map position, was able to do it on my side, but i think was a nice feature to add

@johnpryan
Copy link
Collaborator

I see, thanks for the clarification

@johnpryan johnpryan reopened this Jul 8, 2020
@johnpryan
Copy link
Collaborator

Can you fix the merge conflicts?

@porfirioribeiro porfirioribeiro marked this pull request as ready for review July 9, 2020 08:46
@johnpryan johnpryan merged commit 85558c9 into fleaflet:master Jul 9, 2020
@porfirioribeiro porfirioribeiro deleted the controller_position branch July 20, 2020 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants